import request from '@/utils/request'

// 获取会员等级列表（分页）
export function vipAmountList(data) {
  return request({
    url: '/api/vip/vipAmount/getList',
    method: 'post',
    data
  })
}

// 获取会员列表 
export function vipInfoIdList() {
  return request({
    url: '/api/vip/vipInfo/Selector',
    method: 'post',
    data:{approveState: 2}
  })
}

// 删除会费
export function delVipAmount(id) {
  return request({
    url: `/api/vip/vipAmount/${id}`,
    method: 'DELETE'
  })
}

// 审核会费信息
export function approveVipAmount(id) {
  return request({
    url: `/api/VipAmount/approve/${id}`,
    method: 'PUT'
  })
}

// 获取会费详情
export function vipAmountInfo(id) {
  return request({
    url: `/api/vip/vipAmount/${id}`,
    method: 'get'
  })
}

// 新增会费信息
export function addVipAmount(data) {
  return request({
    url: `/api/vip/vipAmount`,
    method: 'POST',
    data
  })
}

// 编辑会费
export function editVipAmount(id, data) {
  return request({
    url: `/api/vip/vipAmount/${id}`,
    method: 'PUT',
    data
  })
}

// 下载导入模板
export function TemplateDownload() {
  return request({
    url: `/api/vip/vipAmount/TemplateDownload`,
    method: 'GET'
  })
}

// 导入数据
export function ImportData(data) {
  return request({
    url: `/api/vip/vipAmount/ImportData`,
    method: 'post',
    data
  })
}

// 导出数据
export function ExportExcel(data) {
  return request({
    url: `/api/vip/vipAmount/ExportExcelData`,
    method: 'get',
    data
  })
}

// 预览
export function ImportPreview(data) {
  return request({
    url: `/api/vip/vipAmount/ImportPreview`,
    method: 'get',
    data
  })
}
